<?php

session_start();

include_once('config.php');


$id = $_POST['id'];
$userID = $_SESSION['id'];
$sql = "DELETE FROM `product` WHERE id = $id";
$result = mysql_query($sql);



$sql = "SELECT * FROM `product`";
$result = mysql_query($sql);
echo '<tr style="background-color: #0080C0; color: white; text-align: left; font-weight: 600;">
                        <td>Product Title</td>
                        <td>Description</td>
                        <td>Price</td>
                        <td>Discount</td>
                        <td>Active</td>
                        <td></td>
                    </tr>';
while ($row = mysql_fetch_array($result)) {
    echo '
        
<tr>
                        <td><input type="text" id="productTitle" value="' . $row['title'] . '"/></td>
                        <td><input type="text" id="description" value="' . $row['descreption'] . '"/></td>
                        <td><input type="text" id="priceValue" value="' . $row['price'] . '"/></td>
                        <td><input type="text" id="discountValue" value="' . $row['discount'] . '"/></td>
                        <td><select id="statusCombo">
                            <option>Active</option>
                            <option>Not Active</option>
                        </select></td>
                        <td>
                            <a href="javascript:void()0;" title="delete" class="delete" content="' . $row['id'] . '"><img src="images/delete.png" width="20px;" style="float:right; margin-right:20px;"/></a>
                            <a href="javascript:void()0;" title="update" calss="update" content="' . $row['id'] . '"><img src="images/update.png" width="20px;" style="float:right; margin-right:10px;"/></a>
                            <img/>
                        </td>
                        
                        </tr>';
}
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
?>
